import request from '@/router/axios';
import {
    baseUrl,
    mockUrl,
} from '@/config/env';

export const getList = page => request({
    url: `${baseUrl}/app/propertyAssess/page`,
    method: 'get',
    params: page,
});


export const star = (data, type) => request({
    url: `${baseUrl}/app/propertyAssess/assess`,
    method: 'post',
    data: {
        propertyUserId: data.propertyUserId,
        assessUser: data.assessUser, // 评价人
        comment: data.comment, // 评语
        isPraise: type === 1 ? 1 : 0, // 点赞1，评语0
        bz: type === 1 ? 'dz' : 'py', // 点赞：dz，评语：py
        communityId: data.communityId,
        unitId: data.unitId,
        houseId: data.houseId,
        buildingId: data.buildingId,
    },
});